#include <stdlib.h>
#include <stdio.h>

#define N 1000

double randDouble() {
  double t = rand()/(double)RAND_MAX;
  double i = rand();
  return t+i;
}

int main(const int argc, const char* argv[])
{
    int loop;
    int i, l;
    double x[N], y[N], z[N];

//    if (argc != 2)
//      exit(1);
//
//    loop = atoi(argv[1]);
	loop = 1000;
    for(i=0; i<N; i++) {
      x[i] = randDouble();
      y[i] = randDouble();
      z[i] = randDouble();
    }

    for( l=0; l<loop; l++) {
      for( i=1; i<N; i++) {
        x[i] = z[i]*(y[i] - x[i-1]);
        printf("%f", x[i]);
      }
    }
    return 0;
}
